
 package com.ami.vmedia.gui;
 
 import com.ami.kvm.jviewer.Debug;
 import com.ami.kvm.jviewer.JViewer;
 import com.ami.kvm.jviewer.gui.LocaleStrings;
 import com.ami.vmedia.VMApp;
 import java.awt.BorderLayout;
 import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
 import javax.swing.ImageIcon;
 import javax.swing.JFrame;
 import javax.swing.JOptionPane;
 import javax.swing.UIManager;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 public class VMFrame
   extends JFrame
 {
   private static final int VMFRAME_WIDTH = 800;
   private static final int VMFRAME_HEIGHT = 700;
   private VMPane vmPane;
   private VMStatusBar statusPanel;
   
   public VMFrame()
   {
     super(LocaleStrings.getString("G_1_VMD") + " - [ " + JViewer.getIp() + " ]");
     setSize(800, 700);
     VMApp.setWidth(800);
     VMApp.setHeight(700);
     setLayout(new BorderLayout());
     this.vmPane = new VMPane();
     VMApp.setVMPane(this.vmPane);
     this.statusPanel = VMApp.getVMStatusPanel();
     add(this.vmPane, "Center");
     add(this.statusPanel, "South");
     setResizable(false);
     setDefaultCloseOperation(0);
     setVisible(true);
     addWindowListener(new WindowAdapter() {
       public void windowClosing(WindowEvent paramAnonymousWindowEvent) {
         VMFrame.this.closeVMFrame();
       }
     });
     setIconImage(this.vmPane.getImageIcon("jviewer.jpg").getImage());
   }
   
 
 
   private void closeVMFrame()
   {
     if ((VMApp.getInstance().isCDRedirRunning()) || (VMApp.getInstance().isFDRedireRunning()) || (VMApp.getInstance().isHDRedireRunning()))
     {
 
       UIManager.put("Button.defaultButtonFollowsFocus", Boolean.TRUE);
       int i = JOptionPane.showConfirmDialog(JViewer.getMainFrame(), LocaleStrings.getString("C_7_JVF"), LocaleStrings.getString("C_8_JVF"), 0);
       
 
       if (i == -1)
       {
         Debug.out.println("Returning CLOSED_OPTION\n");
         return;
       }
       if (i == 1)
       {
         Debug.out.println("Returning NO_OPTION\n");
         return;
       }
     }
     VMApp.exit(0);
   }
 }


/* Location:              D:\Users\tianlin\Downloads\JViewer.jar!\com\ami\vmedia\gui\VMFrame.class
 * Java compiler version: 5 (49.0)
 * JD-Core Version:       0.7.1
 */